<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

<body>
    <div id="app">
        <div :style='{width:widthStyle,height:heightStyle,border:borderStyle}'>对象用法</div>
        <div :style='objectClass'>对象用法</div>
        <div :style='[objectClass,fontStyle]'>数组用法</div>
    </div>
    <script src="../vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                widthStyle: '100px',
                heightStyle: '100px',
                borderStyle: '1px solid orange',
                objectClass: {
                    width: '200px',
                    height: '200px',
                    border: '1px solid lime'
                },
                fontStyle: {
                    color: 'pink',
                    fontSize: '18px'
                }
            },
            methods: {
                handle: function() {

                }
            }
        })
    </script>
</body>

</html>